package edu.hcmus.sow.web.task;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class EmailSender {

   @RequestMapping("/test")
   public ModelAndView view() {
      ModelAndView mav = new ModelAndView();

      mav.setViewName("test");

      return mav;
   }

   @RequestMapping("/test/send")
   public ModelAndView sendMail() {
      ModelAndView mav = new ModelAndView();

      /*
       * String from = "nsbloc@yahoo.com"; String dsNguoiNhan[] =
       * {"nsbloc@gmail.com","nbphuong88@yahoo.com"}; String title = "[SOW]"; String contentEmail =
       * "Xin chào, tui đang test thử cái send email, hé hé\n....Đây là email spam"; try {
       * MailProcess.sendSSLMail(from, dsNguoiNhan, title, contentEmail); } catch
       * (MessagingException e) { e.printStackTrace(); } mav.setViewName("test");
       */

      return mav;
   }

}
